import AdminLayout from '@/components/layout/AdminLayout.vue'

// 管理员区域路由配置
const adminRoutes = [
  {
    path: '/admin',
    component: AdminLayout,
    meta: { 
      requiresAuth: true,
      requiresAdmin: true // 需要管理员权限
    },
    children: [
      {
        path: '',
        redirect: '/admin/dashboard'
      },
      {
        path: 'dashboard',
        name: 'AdminDashboard',
        component: () => import('@/views/admin/Dashboard.vue'),
        meta: {
          title: '管理员仪表盘 - 万象鉴真',
          description: '管理员数据概览和功能导航',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      // 系统管理路由
      {
        path: 'system',
        name: 'SystemManagement',
        component: () => import('@/views/admin/SystemManagement/Index.vue'),
        meta: {
          title: '系统管理 - 万象鉴真',
          description: '系统管理中心',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'system/users',
        name: 'UserManagement',
        component: () => import('@/views/admin/SystemManagement/UserManagement.vue'),
        meta: {
          title: '用户管理 - 万象鉴真',
          description: '用户账户管理和权限配置',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'system/permissions',
        name: 'PermissionConfig',
        component: () => import('@/views/admin/SystemManagement/PermissionConfig.vue'),
        meta: {
          title: '权限配置 - 万象鉴真',
          description: '系统权限配置和角色管理',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'system/monitoring',
        name: 'SystemMonitoring',
        component: () => import('@/views/admin/SystemManagement/SystemMonitoring.vue'),
        meta: {
          title: '系统监控 - 万象鉴真',
          description: '系统性能监控和日志查看',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'system/optimization',
        name: 'PerformanceOptimization',
        component: () => import('@/views/admin/SystemManagement/PerformanceOptimization.vue'),
        meta: {
          title: '性能优化 - 万象鉴真',
          description: '系统性能优化和调优',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      // 内容管理路由
      {
        path: 'content',
        name: 'ContentManagement',
        component: () => import('@/views/admin/ContentManagement/Index.vue'),
        meta: {
          title: '内容管理 - 万象鉴真',
          description: '内容管理中心',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'content/rumors',
        name: 'RumorDatabase',
        component: () => import('@/views/admin/ContentManagement/RumorDatabase.vue'),
        meta: {
          title: '谣言库管理 - 万象鉴真',
          description: '谣言数据库管理和维护',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'content/fraud-cases',
        name: 'FraudCaseManagement',
        component: () => import('@/views/admin/ContentManagement/FraudCaseManagement.vue'),
        meta: {
          title: '诈骗案例管理 - 万象鉴真',
          description: '诈骗案例数据管理',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'content/knowledge',
        name: 'KnowledgeManagement',
        component: () => import('@/views/admin/ContentManagement/KnowledgeManagement.vue'),
        meta: {
          title: '知识库管理 - 万象鉴真',
          description: '知识库内容管理和维护',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'content/hot-topics',
        name: 'HotTopicManagement',
        component: () => import('@/views/admin/ContentManagement/HotTopicManagement.vue'),
        meta: {
          title: '热点事件管理 - 万象鉴真',
          description: '热点事件跟踪和管理',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      // 模型管理路由
      {
        path: 'model',
        name: 'ModelManagement',
        component: () => import('@/views/admin/ModelManagement/Index.vue'),
        meta: {
          title: '模型管理 - 万象鉴真',
          description: 'AI模型管理中心',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'model/training',
        name: 'TrainingMonitoring',
        component: () => import('@/views/admin/ModelManagement/TrainingMonitoring.vue'),
        meta: {
          title: '训练监控 - 万象鉴真',
          description: '模型训练监控和管理',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'model/evaluation',
        name: 'PerformanceEvaluation',
        component: () => import('@/views/admin/ModelManagement/PerformanceEvaluation.vue'),
        meta: {
          title: '性能评估 - 万象鉴真',
          description: '模型性能评估和分析',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'model/optimization',
        name: 'ParameterOptimization',
        component: () => import('@/views/admin/ModelManagement/ParameterOptimization.vue'),
        meta: {
          title: '参数优化 - 万象鉴真',
          description: '模型参数调优和配置',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'model/dataset',
        name: 'DatasetManagement',
        component: () => import('@/views/admin/ModelManagement/DatasetManagement.vue'),
        meta: {
          title: '数据集管理 - 万象鉴真',
          description: '训练数据集管理和维护',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      // 数据分析路由
      {
        path: 'data-analysis',
        name: 'DataAnalysis',
        component: () => import('@/views/admin/DataAnalysis/Index.vue'),
        meta: {
          title: '数据分析 - 万象鉴真',
          description: '数据分析中心',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'data-analysis/usage-statistics',
        name: 'UsageStatistics',
        component: () => import('@/views/admin/DataAnalysis/UsageStatistics.vue'),
        meta: {
          title: '使用统计分析 - 万象鉴真',
          description: '平台使用统计分析',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'data-analysis/rumor-spread-analysis',
        name: 'RumorSpreadAnalysis',
        component: () => import('@/views/admin/DataAnalysis/RumorSpreadAnalysis.vue'),
        meta: {
          title: '谣言传播分析 - 万象鉴真',
          description: '谣言传播趋势分析',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'data-analysis/fraud-trend-analysis',
        name: 'FraudTrendAnalysis',
        component: () => import('@/views/admin/DataAnalysis/FraudTrendAnalysis.vue'),
        meta: {
          title: '诈骗趋势分析 - 万象鉴真',
          description: '诈骗活动趋势分析',
          requiresAuth: true,
          requiresAdmin: true
        }
      },
      {
        path: 'data-analysis/system-efficiency-report',
        name: 'SystemEfficiencyReport',
        component: () => import('@/views/admin/DataAnalysis/SystemEfficiencyReport.vue'),
        meta: {
          title: '系统效能报告 - 万象鉴真',
          description: '系统效能分析报告',
          requiresAuth: true,
          requiresAdmin: true
        }
      }
    ]
  }
]

export default adminRoutes 